package com.sky.service;

import com.sky.dto.*;
import com.sky.entity.OrderDetail;
import com.sky.entity.Orders;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

import java.util.List;

public interface OrderService {
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 查询历史订单
     * @param page
     * @param pageSize
     * @param status
     * @return
     */
    PageResult getHistoryOrders(int page,int pageSize,Integer status);

    OrderVO getOrderVOById(Long id);

    List<OrderDetail> getOrderDetailById(Long id);

    void userCancelById(Long id) throws Exception;

    OrderStatisticsVO statistics();

    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    void adminCancel(OrdersCancelDTO ordersCancelDTO);

    OrderVO details(Long id);

    void confirm(OrdersConfirmDTO ordersConfirmDTO) throws Exception;

    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    void delivery(Long id);

    void complete(Long id);

    void reminderOrder(Long id);
}
